<?php
/**
 * The following variables are available in this template:
 * - $this: the CrudCode object
 */
?>
<?php echo "<?php\n"; ?>
/* @var $this <?php echo $this->getControllerClass(); ?> */
/* @var $model <?php echo $this->getModelClass(); ?> */
/* @var $form CActiveForm */
?>

<?php echo "<?php \$form=\$this->beginWidget('CActiveForm', array(
	'id'=>'".$this->class2id($this->modelClass)."-form',
	'enableAjaxValidation'=>false,
	'enableClientValidation'=>true,	
	'clientOptions'=>array('validateOnSubmit'=>true),
)); ?>\n"; ?>

<ul class="form_list form_list2">

	<li class="title">
		<span class="fs_14 fw_b"><?php echo "<?php echo (\$model->isNewRecord)?Yii::t('glo','Create'):Yii::t('glo','Update') ?> ".$this->modelClass; ?></span>
	</li>
	
	<?php echo "<?php echo \$form->errorSummary(\$model); ?>\n"; ?>

<?php
foreach($this->tableSchema->columns as $column)
{
	if($column->autoIncrement)
		continue;
?>
	<li class="c_f">
		<span class="tit"><?php echo "<?php echo ".$this->generateActiveLabel($this->modelClass,$column)."; ?>："; ?></span>
		<div class="cont f_l">
			<?php echo "<?php echo ".$this->generateActiveField($this->modelClass,$column)."; ?>\n"; ?>
			<?php echo "<?php echo \$form->error(\$model,'{$column->name}'); ?>\n"; ?>
		</div>
	</li>

<?php
}
?>
	<li class="c_f"><span class="tit">&nbsp;</span>
		<div class="cont f_l">
		<?php echo "<?php echo CHtml::submitButton(\$model->isNewRecord ? Yii::t('glo','Create') : Yii::t('glo','Save'),array('class'=>'mem_btn mem_btn20 mr5')); ?>\n"; ?>
		</div>
	</li>
</ul>
<?php echo "<?php \$this->endWidget(); ?>\n"; ?>
